<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<script type="text/javascript" src="http://img2.wyzc.com/public/js/jquery/jquery-1.8.2.min.js?wyzc_v=201406201655"></script>

</head>
<body>
<h1>面向对象开发 jquery 开发插件</h1>

<ul>
	<li><a href="">新闻新闻1</a></li>
	<li><a href="">新闻新闻2</a></li>
	<li><a href="">新闻新闻3</a></li>
	<li><a href="">新闻新闻4</a></li>
	<li><a href="">新闻新闻5</a></li>
</ul>

<script>


	;(function ($) {
		var Beautifier = function (ele, opt) {
			this.element = ele;
			this.default_option = {
				'color' : '#f00',
				'font-size' : '15px'
			};
			this.option = $.extend({}, this.default_option, opt);
		};

		Beautifier.prototype = {
			beautiful : function () {
				this.element.css(this.option);
			}
		};

		$.fn.myPlugin = function (opt) {
			var beautifier = new Beautifier(this, opt);
			beautifier.beautiful();
			return this;
		};
	})(jQuery);

	$('a').myPlugin({
		'color' : "#f8b2e1"
	});



</script>

</body>
</html>